﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////


#pragma once

#include "IGraphicsNode.h"
#include "PointDisplayShapeType.h"
#include "IPoint3d.h"

namespace gcmp
{
    /// \brief 点图形节点
    class GCMP_GRAPHICS_NODE_INTERFACE_EXPORT IGraphicsPoint : public IGraphicsNode
    {
        DEFINE_CAST_DERIVED(IGraphicsPoint, IGraphicsNode)

    public:
        /// \brief 析构器
        virtual ~IGraphicsPoint();


        /// \brief 设置点的显示形状
        /// \param dp 点的显示形状
        /// \return true-设置成功；false-设置失败
        /// \see PointDisplayShapeType
        virtual bool SetDisplayShape(PointDisplayShapeType dp) = 0;

        /// \brief 获取点的坐标
        /// \return 点的坐标
        virtual Vector3d GetPoint() const = 0;

        /// \brief 设置点的坐标
        /// \param point 点的坐标
        /// \return 无    
        virtual bool SetPoint(const Vector3d& point) = 0;

        /// \brief  设置深度是否正常
        /// \param  isNormal 是否正常,值为true，会有正常的深度遮挡；值为false，深度总是通过。不设置，默认功能实为false
        virtual void SetDepthNormalMode(bool isNormalMode) = 0;

        /// \brief 获取当前节点是否开启深度
        /// \return isNormal 是否正常,值为true，会有正常的深度遮挡；值为false，深度总是通过。不设置，默认功能实为false  
        virtual bool IsDepthNormalMode() const = 0;

    public:
        /// \brief 获取点的显示形状
        /// \return 点的显示形状
        virtual PointDisplayShapeType GetDisplayShape() const = 0;

        /// \brief 获取点的大小
        /// \return 点的半径大小(半径)
        virtual double GetPointSize() const = 0;

        /// \brief 设置点的大小
        /// \param inputSize 点的大小(半径)
        /// \return 无    
        virtual void SetPointSize(double inputSize) = 0;

        /// \brief 获取调试信息
        ///
        /// \return 调试信息
        virtual std::wstring GetStringForDebug() const = 0;

    public:
        /// \brief 创建默认的点图形节点
        /// \return 点图形节点
        static OwnerPtr<IGraphicsPoint> Create();

        /// \brief 根据一点来创建点图形节点
        /// \param point 点的坐标
        /// \return 点图形节点
        static OwnerPtr<IGraphicsPoint> Create(const Vector3d& point);

        /// \brief 根据三维几何点来创建点图形节点
        /// \param point 三维几何点
        /// \return 点图形节点
        static OwnerPtr<IGraphicsPoint> Create(const IPoint3d& point);
    };
}

